import request from '@/utils/request'
export const getrole = (params) => {
  return request({
    url: '/sys/role',
    params
  })
}

// 确定和取消
export const getaddRole = (data) => {
  return request({
    url: '/sys/role',
    method: 'post',
    data
  })
}

// 删除角色
export const delRole = (id) => {
  return request({
    url: `/sys/role/${id}`,
    method: 'delete'
  })
}

// 更新角色
export const updateRole = (data) => {
  return request({
    url: `/sys/role/${data.id}`,
    method: 'put',
    data
  })
}
